<div class="welfareInfo">
    <div class="header">
        <h4 class="title">福利编辑</h4>
    </div>
    <div class="welfare-edit">
        <section class="useDemo">
            <div class="panel panel-default">
                <div class="panel-heading">内容</div>
                <div class="panel-body">
                    <div class="panel panel-default item" ng-repeat="item in welfareInfo.useDemo">
                        <div class="panel-heading item-title">
                            <select class="form-control" id="type" ng-model="item.type">
                                <option value="text">文本</option>
                                <option value="img">图片</option>
                                <option value="video">视频</option>
                            </select>
                            <i class="glyphicon glyphicon-trash" title="删除" ng-click="removeItem(item)"></i>
                        </div>
                        <div class="panel-body item-content">
                            <textarea name="" id="value" class="form-control" ng-model="item.value"></textarea>
                        </div>
                    </div>
                    <div class="add-icon" ng-click="addItem()">
                        <i class="glyphicon glyphicon-plus"></i>
                    </div>
                </div>
            </div>
        </section>
        <section class="other">
            <div class="panel panel-default">
                <div class="panel-heading">基础信息</div>
                <div class="panel-body">
                    <form class="form-horizontal" ng-submit="saveWelfareInfo()" id="welfareForm">
                        <div class="form-group">
                            <label for="name" class="col-lg-4 col-md-4 control-label">标题</label>
                            <div class="col-lg-8 col-md-8">
                                <input id="name" type="text" class="form-control" placeholder="请输入福利标题" ng-model="welfareInfo.name" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="code" class="col-lg-4 col-md-4 control-label">类别</label>
                            <div class="col-lg-8 col-md-8">
                                <select class="form-control" id="code" ng-model="welfareInfo.code">
                                    <option value="0">线上</option>
                                    <option value="A">线下</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="type" class="col-lg-4 col-md-4 control-label">类型</label>
                            <div class="col-lg-8 col-md-8">
                                <select class="form-control" id="type" ng-model="welfareInfo.type">
                                    <option value="1">电影票</option>
                                    <option value="2">充值卡</option>
                                    <option value="3">优惠券</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="price" class="col-lg-4 col-md-4 control-label">价值</label>
                            <div class="col-lg-8 col-md-8">
                                <input id="price" type="text" class="form-control" placeholder="" ng-model="welfareInfo.price" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="specialDemo" class="col-lg-4 col-md-4 control-label">特殊说明</label>
                            <div class="col-lg-8 col-md-8">
                                <input id="specialDemo" type="text" class="form-control" placeholder="" ng-model="welfareInfo.specialDemo" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="startDay" class="col-lg-4 col-md-4 control-label">领取有效期</label>
                            <div class="col-lg-8 col-md-8">
                                <div dx-date-box="startDayConfig"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="endDay" class="col-lg-4 col-md-4 control-label"></label>
                            <div class="col-lg-8 col-md-8">
                                <div dx-date-box="endDayConfig"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="useStart" class="col-lg-4 col-md-4 control-label">使用有效期</label>
                            <div class="col-lg-8 col-md-8">
                                <div dx-date-box="useStartConfig"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="useStart" class="col-lg-4 col-md-4 control-label">使用有效期</label>
                            <div class="col-lg-8 col-md-8">
                                <div dx-date-box="useEndConfig"></div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="allCounts" class="col-lg-4 col-md-4 control-label">总数量</label>
                            <div class="col-lg-8 col-md-8">
                                <input id="allCounts" type="text" class="form-control" placeholder="" ng-model="welfareInfo.allCounts" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="useCounts" class="col-lg-4 col-md-4 control-label">当前已使用</label>
                            <div class="col-lg-8 col-md-8">
                                <p class="form-control-static" id="useCounts" ng-bind="welfareInfo.useCounts"></p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="browses" class="col-lg-4 col-md-4 control-label">浏览量</label>
                            <div class="col-lg-8 col-md-8">
                                <p class="form-control-static" id="browses" ng-bind="welfareInfo.browses"></p>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="status" class="col-lg-4 col-md-4 control-label">当前状态</label>
                            <div class="col-lg-8 col-md-8">
                                <select class="form-control" id="status" ng-model="welfareInfo.status">
                                    <option value="0">未发布</option>
                                    <option value="1">已发布</option>
                                    <option value="2">已撤销</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="delStatus" class="col-lg-4 col-md-4 control-label">删除状态</label>
                            <div class="col-lg-8 col-md-8">
                                <select class="form-control" id="delStatus" ng-model="welfareInfo.delStatus">
                                    <option value="0">未删除</option>
                                    <option value="1">已删除</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="img" class="col-lg-4 col-md-4 control-label">封面图片</label>
                            <div class="col-lg-8 col-md-8">
                                <input type="file" onchange="angular.element(this).scope().uploadPhoto(this.files[0],angular.element(this).scope().welfareInfo)"
                                    accept="image/*">
                                <img src="{{welfareInfo.img}}" alt="">
                            </div>
                        </div>
                        <div class="panel-heading">兑换条件</div>
                        <div class="form-group">
                            <label for="exchangeCounts" class="col-lg-4 col-md-4 control-label">每人限兑次数</label>
                            <div class="col-lg-8 col-md-8">
                                <input id="exchangeCounts" type="text" class="form-control" placeholder="" ng-model="welfareInfo.exchangeCounts" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="times" class="col-lg-4 col-md-4 control-label">兑换所需公益时间</label>
                            <div class="col-lg-8 col-md-8">
                                <input id="times" type="text" class="form-control" placeholder="单位:小时" ng-model="welfareInfo.times" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="integral" class="col-lg-4 col-md-4 control-label">兑换所需积分</label>
                            <div class="col-lg-8 col-md-8">
                                <input id="integral" type="text" class="form-control" placeholder="" ng-model="welfareInfo.integral" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="area" class="col-lg-4 col-md-4 control-label">兑换区域</label>
                            <div class="col-lg-8 col-md-8">
                                <label class="radio-inline">
                                    <input type="radio" name="area" id="inlineRadio1" value="全国" ng-model="welfareInfo.area"> 全国
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="area" id="inlineRadio2" value="定向" ng-model="welfareInfo.area"> 定向
                                </label>
                            </div>
                        </div>
                        <div class="form-group" ng-if="welfareInfo.area != '全国'">
                            <label for="area" class="col-lg-4 col-md-4 control-label"></label>
                            <div class="col-lg-8 col-md-8">
                                <div class="row">
                                    <div class="col-lg-6 col-md-6">
                                        <select class="form-control" ng-model="welfareInfo.province" id="province" ng-options="item.ProName as item.ProName for item  in province"
                                            tabindex="3" ng-change="provinceChange()">
                                        </select>
                                    </div>
                                    <div class="col-lg-6 col-md-6">
                                        <select class="form-control" ng-model="welfareInfo.city" id="city" ng-options="item.CityName as item.CityName for item  in currCityList"
                                            tabindex="3">
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </section>
    </div>
    <div class="group">
        <input type="submit" value="提交" class="btn" form="welfareForm" />
        <a href="" class="btn" ng-click="goBack()">返回</a>
    </div>
</div>